$OpenBSD: patch-dcmwlm_libsrc_wlds_cc,v 1.1 2017/05/06 16:59:31 espie Exp $
bad deletes

Index: dcmwlm/libsrc/wlds.cc
--- dcmwlm/libsrc/wlds.cc.orig
+++ dcmwlm/libsrc/wlds.cc
@@ -845,7 +845,7 @@ OFBool WlmDataSource::IsValidDateOrDateRange( const ch
       strncpy( newDateRange, dateRange, strlen( dateRange ) - 1 );
       newDateRange[ strlen( dateRange ) - 1 ] = '\0';
       isValidDateRange = IsValidDate( newDateRange );
-      delete newDateRange;
+      delete [] newDateRange;
     }
     else
     {
@@ -869,8 +869,8 @@ OFBool WlmDataSource::IsValidDateOrDateRange( const ch
         isValidDateRange = OFTrue;
 
       // free memory
-      delete date1;
-      delete date2;
+      delete [] date1;
+      delete [] date2;
     }
   }
   else
@@ -1003,7 +1003,7 @@ OFBool WlmDataSource::IsValidTimeOrTimeRange( const ch
       strncpy( newTimeRange, timeRange, strlen( timeRange ) - 1 );
       newTimeRange[ strlen( timeRange ) - 1 ] = '\0';
       isValidTimeRange = IsValidTime( newTimeRange );
-      delete newTimeRange;
+      delete [] newTimeRange;
     }
     else
     {
@@ -1027,8 +1027,8 @@ OFBool WlmDataSource::IsValidTimeOrTimeRange( const ch
         isValidTimeRange = OFTrue;
 
       // free memory
-      delete time1;
-      delete time2;
+      delete [] time1;
+      delete [] time2;
     }
   }
   else
